package _22define.test;

import java.io.*;

public class Word2 {
    public static void main(String[] args) throws IOException {
        BufferedOutputStream out1=new BufferedOutputStream(new FileOutputStream(new File("src/note/b.txt")));
        BufferedOutputStream out2=new BufferedOutputStream(new FileOutputStream(new File("src/note/c.txt")));
        String[] words = {"verb:eat","verb:drink","verb:sleep","verb:play","noun:rice","noun:meat","noun:hand","noun:hair"};
        for (String word : words) {
            if (word.substring(0,4).equals("verb")){
                out1.write(word.getBytes());
                out1.write("\r\n".getBytes());

            } else if (word.substring(0,4).equals("noun")) {
                out2.write(word.getBytes());
                out2.write("\r\n".getBytes());

            }
        }
        out1.flush();
        out1.close();
        out2.flush();
        out2.close();
    }
}
